#! /bin/ksh
# nmo, decon before stack, and stack
set -x

# set parameters
input=dmocmgs
stack=dmostack
integer cdp1=201 cdp2=800 fold=30

# nmo, decon before stack, and stack
integer count=fold*(cdp2-cdp1+1)
suwind <$input key=cdp min=$cdp1 max=$cdp2 count=$count |
sugain tpow=2 |
supef minlag=0.024 maxlag=0.250 |
sunmo cdp=301,401,501,601,701 \
        tnmo=0.00,0.66,0.90,1.30,1.55,1.75,2.28,2.84,4.71,6.00 \
        vnmo=1500,1598,1663,1775,1858,1952,2018,2203,2714,2840 \
        tnmo=0.00,0.26,0.94,1.43,1.96,2.28,2.84,4.71,6.00 \
        vnmo=1500,1522,1670,1782,1923,2018,2203,2714,2840 \
        tnmo=0.00,0.64,0.93,1.67,1.91,2.27,2.93,3.54,4.20,6.00 \
        vnmo=1500,1630,1655,1829,1883,1977,2105,2378,2690,2840 \
        tnmo=0.00,0.38,0.69,1.32,1.80,2.18,2.56,3.46,5.02,6.00 \
        vnmo=1500,1540,1645,1767,1912,1988,2078,2306,2887,3000 \
        tnmo=0.00,0.42,0.80,1.25,1.78,2.23,3.03,3.40,4.24,5.20 \
        vnmo=1500,1547,1652,1735,1836,1934,2252,2367,2671,3000 \
        |
sustack >$stack

# plot the stack
sugain <$stack gpow=0.5 |
suximage f2=$cdp1 d2=1 label2="CMP"\
        label1="Time (sec)" title="DMO Stack of CMPs $cdp1 to $cdp2" \
        perc=99 grid1=solid &
